<template>
  <img alt="Vue logo" src="./assets/logo.png">
  <!--自定义组件的名称大小写敏感-->
  <!--3、使用自定义组件-->
  <hello-World helloWorldMsg="固定字符串：Welcome to Your Vue.js App"/>
  <!--把父组件appMsg的属性值赋值给子组件props中的helloWorldMsg，可以用camel命名法/大写字母转小写并用短线连接-->
  <hello-World v-bind:helloWorldMsg="appMsg"/>
  <hello-World v-bind:hello-world-msg="appMsg"/>
  <Sidebar></Sidebar>
  <Footer></Footer>
</template>

<script>
//1、引入自定义组件
import HelloWorld from './components/HelloWorld.vue'
import Sidebar from './components/Sidebar.vue'
import Footer from './components/Footer.vue'

export default {
  name: 'App',
  data() {
    return { appMsg: "父组件的appMsg属性值" }
  },
  components: {
    //2、注册自定义组件
    "hello-World": HelloWorld,
    Sidebar,
    Footer
  }
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
